Websydian v6.1 online documentationOnline documentation - Websydian v6.5

Problem - GetFirstOccurence for the Fault element returns 0

Severity Low
Product Websydian TransacXML
Websydian version 4.0, 5.5, 5.6
Resolved in v5.7
Plex version All
Platform Windows and Java
Category TransacXML - Web services
Problem A response document containing a Fault element was received by the SOAPGenerator, but the GetFirstOccurence function for the Fault element returns 0.
Answer The reason for the problem is that the XPath expression for the GetFirstOccurrence function searches for Envelope/Body/Fault. However, this is done on the document extracted from the Body element, and the extracted document has Fault as the top element.

The above XPath expression does not correspond to anything in the extracted document and 0 is returned by the GetFirstOccurrence function.

Workaround To fix this change the mapping on the 2 function calls found in the post point 'After handle Response' in the SoapGenerator function.

 

Mapping in call to ...Fault.GetFirstOccurrence:

  • ObjectStoreReference -> Response<ObjectStoreReference>
  • ObjectDocument -> Response<SOAPDocument>
  • ParentElement -> <ParentElement.NULL>

 

Mapping in call to ...Fault.SingleFetch:

  • ObjectStoreReference -> Response<ObjectStoreReference>
  • ObjectElement -> unchanged (output from GetFirstOccurrence)